s='%s%d%.2f'
print(s %('xie',100,5.2))
name='xiezhuoyu'
print(f'姓名:{name}')
print('姓名：{0}'.format(name))

a='xzy'
print('{0:*<10}'.format(a))# *<10:右对齐，宽度为10,*填充
print('{0:*>10}'.format(a))# *>10:左对齐，宽度为10,*填充
print('{0:*^10}'.format(a))# *^10:居中对齐，宽度为10,*填充

print('{0:,}'.format(123456789.12456))# 千分号分割

print('{0:.4f}'.format(3.1415926))
print('{0:.2}'.format(3.1415926))

a=123
print('二进制:{0:b},十进制:{0:d},八进制:{0:o},十六进制:{0:x}'.format(a))
b=123.321
print('{0:.2f},{0:.2E},{0:.2e},{0:.2%}'.format(b))